package com.jmoney.luckeylink.controller;

import static io.restassured.RestAssured.given;

import io.restassured.RestAssured;
import io.restassured.config.SSLConfig;
import io.restassured.response.Response;

public class LekeW_RepairProcessing_Controller {
    /**
	    * 指定接口地址，获取报修处理信息
	    * @param ApiUrl
	    * @return RoomUserMap
	    */
	public static Object[] GetRepairProcessingInfo(String ApiUrl) throws Exception{

	       Response response = given()
	               .config((RestAssured.config().sslConfig(new SSLConfig().relaxedHTTPSValidation())))
	               .contentType("application/json")
	               .log().all()
	               .request()
	               .when()
	               .get(ApiUrl);

	       String Json = response.asString();
	       
	       int status_code = response.jsonPath().getInt("status_code");
	       String message = response.jsonPath().get("message");

	       int community_id = response.jsonPath().getInt("data.data[0].community_id");

	       Object[] RepairProcessingInfoInfo ={Json,status_code,message,community_id};

	       return RepairProcessingInfoInfo;
	   } 
}
